/**
* 
* Timer system 
* see <a href="{@docRoot}/Documentation/timer.html"> for more information</a>
*  Copyright (c) 2009 Ecole Centrale de Nantes IRCCyN
* @author: Urunuela Richard
* @version 3.2
*/
package storm;

import java.lang.reflect.Method;
/**
 * 
 * @author richard
 *
 */
public class Timer {
	int date;
	Method fonction;
	Object prop;
	/**
	 * 
	 * @param fonction
	 * @param value
	 * @param prop
	 */
	public Timer (Method fonction,int value,Object prop){
		this.fonction = fonction;
		this.date =value;
		this.prop= prop;
		
	}
	/**
	 * 
	 * @param method
	 * @param i
	 * @param A
	 */
	public Timer(String method, int i, Entity A){
		Class maClass = A.getClass();
		prop=A;
		date=i;
		try {
			//fonction = maClass.getDeclaredMethod(method, null);
			fonction = maClass.getMethod(method,(java.lang.Class[])null);
		} catch (SecurityException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (NoSuchMethodException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
